package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单管理对象 orders
 *
 * @author xin
 * @date 2024-04-20
 */
public class Orders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 订单号 */
    @Excel(name = "订单号")
    private String number;

    /** 下单用户id */
    private Long userId;

    /** 关联的活动id */
    private Long activityId;

    /** 关联的优惠券id */
    private Long couponId;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Long status;

    /** 用户名称 */
    private String userName;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下单时间", width = 40, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderTime;

    /** 支付完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime checkoutTime;

    /** 支付状态 */
    private Integer payStatus;

    /** 优惠金额 */
    private BigDecimal preferentialAmount;

    /** 实收金额 */
    @Excel(name = "实收金额")
    private BigDecimal amount;

    /** 手机号 */
    private String phone;

    /** 订单取消时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cancelTime;

    /** 订单取消原因 */
    private String cancelReason;

    /** 订单退款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime refundTime;

    /** 订单退款原因 */
    private String refundReason;

    /** 预计出行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date estimatedTripTime;

    /** 订单完成时间 */
    private Date deliveryTime;

    /** 开始日期 */
    private Date startDate;

    /** 结束日期 */
    private Date endDate;

    /** 是否已评论 */
    private Integer isComment;

    /** 关联的评论id */
    private Long commentId;

    /** 订单详情信息 */
    private List<OrderDetail> orderDetailList;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setNumber(String number)
    {
        this.number = number;
    }

    public String getNumber()
    {
        return number;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setActivityId(Long activityId)
    {
        this.activityId = activityId;
    }

    public Long getActivityId()
    {
        return activityId;
    }
    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCouponId()
    {
        return couponId;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setOrderTime(LocalDateTime orderTime)
    {
        this.orderTime = orderTime;
    }

    public LocalDateTime getOrderTime()
    {
        return orderTime;
    }
    public void setCheckoutTime(LocalDateTime checkoutTime)
    {
        this.checkoutTime = checkoutTime;
    }

    public LocalDateTime getCheckoutTime()
    {
        return checkoutTime;
    }
    public void setPayStatus(Integer payStatus)
    {
        this.payStatus = payStatus;
    }

    public Integer getPayStatus()
    {
        return payStatus;
    }
    public void setPreferentialAmount(BigDecimal preferentialAmount)
    {
        this.preferentialAmount = preferentialAmount;
    }

    public BigDecimal getPreferentialAmount()
    {
        return preferentialAmount;
    }
    public void setAmount(BigDecimal amount)
    {
        this.amount = amount;
    }

    public BigDecimal getAmount()
    {
        return amount;
    }
    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }
    public void setCancelTime(LocalDateTime cancelTime)
    {
        this.cancelTime = cancelTime;
    }

    public LocalDateTime getCancelTime()
    {
        return cancelTime;
    }
    public void setCancelReason(String cancelReason)
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason()
    {
        return cancelReason;
    }
    public void setRefundTime(LocalDateTime refundTime)
    {
        this.refundTime = refundTime;
    }

    public LocalDateTime getRefundTime()
    {
        return refundTime;
    }
    public void setRefundReason(String refundReason)
    {
        this.refundReason = refundReason;
    }

    public String getRefundReason()
    {
        return refundReason;
    }
    public void setEstimatedTripTime(Date estimatedTripTime)
    {
        this.estimatedTripTime = estimatedTripTime;
    }

    public Date getEstimatedTripTime()
    {
        return estimatedTripTime;
    }
    public void setDeliveryTime(Date deliveryTime)
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime()
    {
        return deliveryTime;
    }
    public void setStartDate(Date startDate)
    {
        this.startDate = startDate;
    }

    public Date getStartDate()
    {
        return startDate;
    }
    public void setEndDate(Date endDate)
    {
        this.endDate = endDate;
    }

    public Date getEndDate()
    {
        return endDate;
    }
    public void setIsComment(Integer isComment)
    {
        this.isComment = isComment;
    }

    public Integer getIsComment()
    {
        return isComment;
    }
    public void setCommentId(Long commentId)
    {
        this.commentId = commentId;
    }

    public Long getCommentId()
    {
        return commentId;
    }

    public List<OrderDetail> getOrderDetailList()
    {
        return orderDetailList;
    }

    public void setOrderDetailList(List<OrderDetail> orderDetailList)
    {
        this.orderDetailList = orderDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("number", getNumber())
            .append("userId", getUserId())
            .append("activityId", getActivityId())
            .append("couponId", getCouponId())
            .append("status", getStatus())
            .append("userName", getUserName())
            .append("orderTime", getOrderTime())
            .append("checkoutTime", getCheckoutTime())
            .append("payStatus", getPayStatus())
            .append("preferentialAmount", getPreferentialAmount())
            .append("amount", getAmount())
            .append("phone", getPhone())
            .append("remark", getRemark())
            .append("cancelTime", getCancelTime())
            .append("cancelReason", getCancelReason())
            .append("refundTime", getRefundTime())
            .append("refundReason", getRefundReason())
            .append("estimatedTripTime", getEstimatedTripTime())
            .append("deliveryTime", getDeliveryTime())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("isComment", getIsComment())
            .append("commentId", getCommentId())
            .append("orderDetailList", getOrderDetailList())
            .toString();
    }
}
